package com.zhenzhen.xszhcp.serviceImpl;

import com.zhenzhen.xszhcp.mapper.ZhuangtaiMapper;
import com.zhenzhen.xszhcp.model.Zhuangtai;
import com.zhenzhen.xszhcp.service.ZhuangtaiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public class ZhuangtaiServiceImpl implements ZhuangtaiService {
    @Autowired
    private ZhuangtaiMapper mapper;
    @Override
    public List<Zhuangtai> getZhuangtaiList(Map paramMap) {
        return mapper.getZhuangtaiList(paramMap);
    }

    @Override
    public Zhuangtai getZhuangtaiById(int id) {
        return mapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertZhuangtai(Zhuangtai zhuangtai) {
        return mapper.insertSelective(zhuangtai);
    }

    @Override
    public int delZhuangtai(int id) {
        return mapper.deleteByPrimaryKey(id);
    }

    @Override
    public int upZhuangtai(Zhuangtai zhuangtai) {
        return mapper.updateByPrimaryKeySelective(zhuangtai);
    }
}
